#include "RBTree.hpp"
#include <vector>
#include <ctime>
#include <cstdlib>

int main()
{
    //int a[] = {16, 3, 7, 11, 9, 26, 18, 14, 15};
    // int a[] = {4, 2, 6, 1, 3, 5, 15, 7, 16, 14};
    RBTree<int, int> t1;
    vector<int> a(1000000);
    srand((unsigned long)time(0));
    for(size_t i = 0; i < 10000; i++)
    {
        a.push_back(rand());
    }
    for(auto e: a)
    {
        t1.Insert(make_pair(e, e));
        if(!t1.IsBalance())
        {
            cerr << "not balance" << endl;
            break;
        }
    }
 	//t1.InOrder();
    //cout << t1.IsBalance() << endl;
    return 0;
}